Skip to content

Add MemoryExtra in InterpretCx constructor params#62158

Merged
bors merged 3 commits into
rust-lang:masterfrom
pvdrz:ecx-memory-extra
Jul 5, 2019
Merged

Add MemoryExtra in InterpretCx constructor params#62158
bors merged 3 commits into
rust-lang:masterfrom
pvdrz:ecx-memory-extra

Conversation

@pvdrz

@pvdrz pvdrz commented Jun 26, 2019

Copy link
Copy Markdown
Contributor

This is to avoid modifying MemoryExtra inside InterpretCx after initialization. Related miri PR: rust-lang/miri#792

r? @RalfJung

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 26, 2019
@RalfJung

Copy link
Copy Markdown
Member

Please also change Machine trait in machine.rs to not require a Default bound for MemoryExtra.

@pvdrz

pvdrz commented Jun 26, 2019

Copy link
Copy Markdown
Contributor Author

Please also change Machine trait in machine.rs to not require a Default bound for MemoryExtra.

I believe this is still required for all the Memory initializations inside the compiler. Should I remove it then?

Edit: Here for example: https://github.com/rust-lang/rust/blob/0a7b9953672e1c5cedee029b288fdc1d7b794cc7/src/librustc_mir/const_eval.rs#L50

@RalfJung

Copy link
Copy Markdown
Member

That code will still work fine because there we are using a concrete MemoryExtra that does implement Default.

But what the trait says is that anyone implementing the Machine interface must provide a MemoryExtra that implements Default. There is no reason left to require that.

Comment thread src/librustc_mir/const_eval.rs Outdated

@RalfJung RalfJung left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! r=me once Travis is green and with the nit fixed.

@bors delegate

@pvdrz

pvdrz commented Jun 26, 2019

Copy link
Copy Markdown
Contributor Author

r=@RalfJung

@RalfJung

RalfJung commented Jun 26, 2019

Copy link
Copy Markdown
Member

It would be @ bors r=RalfJung. Note the lack of a second @. ;)

@bors r+

@bors

bors commented Jun 26, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 74a9c6eefcfa6469fae9f76d023429c0cb619ead has been approved by RalfJung

@bors

bors commented Jun 26, 2019

Copy link
Copy Markdown
Collaborator

🌲 The tree is currently closed for pull requests below priority 999, this pull request will be tested once the tree is reopened

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 26, 2019
@bors

bors commented Jun 26, 2019

Copy link
Copy Markdown
Collaborator

💡 This pull request was already approved, no need to approve it again.

@bors

bors commented Jun 26, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 74a9c6eefcfa6469fae9f76d023429c0cb619ead has been approved by RalfJung.`

@bors

bors commented Jun 26, 2019

Copy link
Copy Markdown
Collaborator

🌲 The tree is currently closed for pull requests below priority 999, this pull request will be tested once the tree is reopened

@bors

bors commented Jun 26, 2019

Copy link
Copy Markdown
Collaborator

💡 This pull request was already approved, no need to approve it again.

@bors

bors commented Jun 26, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 74a9c6eefcfa6469fae9f76d023429c0cb619ead has been approved by RalfJung

@bors

bors commented Jun 26, 2019

Copy link
Copy Markdown
Collaborator

🌲 The tree is currently closed for pull requests below priority 999, this pull request will be tested once the tree is reopened

@pvdrz

pvdrz commented Jun 26, 2019

Copy link
Copy Markdown
Contributor Author

It would be @ bors r=RalfJung. Note the lack of a second @. ;)

@bors r+

Oh ok! Thank you!

@bors

bors commented Jun 26, 2019

Copy link
Copy Markdown
Collaborator

@christianpoveda: 🔑 Insufficient privileges: Not in reviewers

@RalfJung

RalfJung commented Jun 28, 2019

Copy link
Copy Markdown
Member

@bors rollup=never (breaks Miri)

@rust-lang/infra why does rollup- not work? That would be much more consistent with the rest of the syntax.

@pvdrz

pvdrz commented Jun 28, 2019

Copy link
Copy Markdown
Contributor Author

Remember that rust-lang/miri#792 needs these changes to work

@RalfJung

Copy link
Copy Markdown
Member

I do. The thing is, we are about to branch off beta in less than a week, which means changes that break Miri cannot land. So once #62105 lands, we'll have to fold a Miri update into this PR.

@RalfJung

Copy link
Copy Markdown
Member

Looks very much like the Miri update will land first, so let's avoid wasting CI time.

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 28, 2019
@RalfJung

Copy link
Copy Markdown
Member

@christianpoveda okay the Miri PR landed, are you ready to update this one? I prepared the rustup branch in the Miri repository for you. The sequence of commands for you (assuming you checked out your local branch for this PR) should roughly be

git fetch origin
git rebase origin/master # this should just work without conflicts
git status # this should show a clean working dir!
cd src/tools/miri
git fetch origin
git reset --hard origin/rustup
cd ../../..
./x.py # updates Cargo.lock if needed
git commit -am "update miri"

@RalfJung

Copy link
Copy Markdown
Member

Now how do I get rid of this "rollup=never" thing...

@bors rollup-

@bors

bors commented Jul 1, 2019

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #62253) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 1, 2019
@RalfJung

RalfJung commented Jul 1, 2019

Copy link
Copy Markdown
Member

@christianpoveda we got overtaken by another PR that also modifies Miri... can you do a rebase and do the submodule update again? I updated the rustup branch on the Miri side.

@RalfJung

RalfJung commented Jul 1, 2019

Copy link
Copy Markdown
Member

Alternatively, you can remove the miri-updating commit and we wait until Wednesday, when we get out of the "freeze" for tools.

@pvdrz

pvdrz commented Jul 1, 2019

Copy link
Copy Markdown
Contributor Author

Alternatively, you can remove the miri-updating commit and we wait until Wednesday, when we get out of the "freeze" for tools.

I will do this, it seems the better option right now
Edit: It is done, I'll wait until wednesday to see what's up

@RalfJung

RalfJung commented Jul 2, 2019

Copy link
Copy Markdown
Member

It's just 4h until it's Wednesday UTC, I feel confident this will not land fast enough to cause problems and I want to stop having to remember.^^

@bors r+

@bors

bors commented Jul 2, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit e32b8eb has been approved by RalfJung

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 2, 2019
@bors

bors commented Jul 4, 2019

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #62355) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 4, 2019
@RalfJung

RalfJung commented Jul 4, 2019

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Jul 4, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit e45bbaf has been approved by RalfJung

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 4, 2019
Centril added a commit to Centril/rust that referenced this pull request Jul 5, 2019
…=RalfJung

Add MemoryExtra in InterpretCx constructor params

This is to avoid modifying `MemoryExtra` inside `InterpretCx` after initialization. Related miri PR: rust-lang/miri#792

r? @RalfJung
Centril added a commit to Centril/rust that referenced this pull request Jul 5, 2019
…=RalfJung

Add MemoryExtra in InterpretCx constructor params

This is to avoid modifying `MemoryExtra` inside `InterpretCx` after initialization. Related miri PR: rust-lang/miri#792

r? @RalfJung
Centril added a commit to Centril/rust that referenced this pull request Jul 5, 2019
…=RalfJung

Add MemoryExtra in InterpretCx constructor params

This is to avoid modifying `MemoryExtra` inside `InterpretCx` after initialization. Related miri PR: rust-lang/miri#792

r? @RalfJung
bors added a commit that referenced this pull request Jul 5, 2019
Rollup of 13 pull requests

Successful merges:

 - #61545 (Implement another internal lints)
 - #62110 (Improve -Ztime-passes)
 - #62133 (Feature gate `rustc` attributes harder)
 - #62158 (Add MemoryExtra in InterpretCx constructor params)
 - #62168 (The (almost) culmination of HirIdification)
 - #62193 (Create async version of the dynamic-drop test)
 - #62369 (Remove `compile-pass` from compiletest)
 - #62380 (rustc_target: avoid negative register counts in the SysV x86_64 ABI.)
 - #62381 (Fix a typo in Write::write_vectored docs)
 - #62390 (Update README.md)
 - #62396 (remove Scalar::is_null_ptr)
 - #62406 (Lint on invalid values passed to x.py --warnings)
 - #62414 (Remove last use of mem::uninitialized in SGX)

Failed merges:

r? @ghost
@bors bors merged commit e45bbaf into rust-lang:master Jul 5, 2019
@pvdrz pvdrz deleted the ecx-memory-extra branch July 6, 2019 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants